package common;

public class Word implements Comparable<Word>{
    private String keyword;
    private float weight;
    public Word( String keyword,float weight ){
        this.keyword = keyword;
        this.weight = weight;
    }
    
    public String getKeyword(){
	    return keyword;
    }
    public float getWeight(){
	    return weight;
    }
    public void setWeight( float w ){
	    this.weight = w;
    }
    public void setKeyword( String word ){
	    this.keyword = word;
    }
    public int compareTo( Word another ){
	    return Float.compare( this.weight,another.weight );
    }
    
    public String toString(){
	    return "("+keyword+","+weight+")";	 

    }
}